○配置先のディレクトリパスを取得

■VB7

Dim str_path As String = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
Debug.WriteLine(str_path)

■C#

string str_path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
System.Diagnostics.Trace.WriteLine(str_path);



▲トップページ > Visual BASIC と C#